import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    devicesData: [],
    selectedDevice: null,
  },
  mutations: {
    setDevicesData(state, data) {
      state.devicesData = data;
    },
    setSelectedDevice(state, device) {
      state.selectedDevice = device;
    },
  },
  // ... 其他actions、getters等
});
